package demo_09_25_03;

import java.util.Scanner;

/**
 * @author:连志鹏
 * @className:work_02
 * @descrption:
 * @date: 2021/9/25 9:58
 * @version: 0.1
 * @since: 1.8
 */
public class work_02 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

//        	声明一个int型的数组，循环接收8个学生的成绩，计算这8个学生的总分、平均分、最高分、最低分
        int[] scoreList = new  int[8];

        int max = 0;int min = 100;
        int sum = 0;
        for (int i = 0; i < 8; i++) {
            scoreList[i] = sc.nextInt();
            if(max<scoreList[i])
                max = scoreList[i];
            if (min>scoreList[i])
                min = scoreList[i];

            sum = sum +scoreList[i];
        }
        float average = sum/8;

        System.out.println("总分"+sum+"平均分"+average+"最高分"
            +max+"最低分"+min);
    }
}
